<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>在线cron表达式</title>
    <link href="https://www.sunyuchao.com/static/layui/css/layui.css"  rel="stylesheet">

    <link href="https://www.sunyuchao.com/static/css/fontawesome4.7.0/css/font-awesome.css" rel="stylesheet">
    <link href="https://www.sunyuchao.com/static/css/utilscommon.css"  rel="stylesheet">
    <link href="https://www.sunyuchao.com/static/css/common.css" rel="stylesheet" >
    <link href="https://www.sunyuchao.com/static/css/reply.css" rel="stylesheet" >
    <script th:src="${iconfontUrl}"></script>

    <style>
        .tab-wrap{background-color: white;padding: 3px 10px;margin-top: 10px;}
        .tab-wrap .tab-wrap-square{padding: 5px;margin-bottom: 10px;position: relative;border-bottom: 1px solid #e7e7e7;
            padding-bottom: 10px;padding-top: 12px;}
        .tab-wrap .tab-wrap-square::after {
            position: absolute;
            left: 0;
            bottom: 0;
            height: 2.5px!important;
            width: 100px;
            background-color: #51aded;
            content: '';
            transition:width 2s;
            -moz-transition:width 2s; /* Firefox 4 */
            -webkit-transition:width 2s; /* Safari and Chrome */
            -o-transition:width 2s; /* Opera */
        }
        /*鼠标悬停div修改子元素样式*/
        .tab-wrap:hover .tab-wrap-square:first-child::after{
            width: 400px;
        }

        .tab-wrap .reply-all-head{font-size: 18px;font-weight: bold;}

        /*手机*/
        @media screen and (max-width: 980px) {
            .smb-right{width:88%;}
        }
    </style>
</head>
<body>
<!--搜索-->
<div th:replace="index :: search"></div>
<!--右下角固定-->
<div th:replace="index :: permanent"></div>
<div th:replace="index :: top"></div>
<div class="content">
    <h1 class="square">
        <span class="f-right">我本可以容忍黑暗，如果我不曾见过太阳 —— 艾米莉·狄金森</span>
    </h1>
    <input type="hidden" th:value="${bindId}" name="id">
    <div class="left">
        <h2>cron表达式</h2>
        <div class="tab-wrap">
           <div class="layui-tab">
               <ul class="layui-tab-title">
                   <li class="layui-this">秒</li>
                   <li>分钟</li>
                   <li>小时</li>
                   <li>日</li>
                   <li>月份</li>
                   <li>周（星期）</li>
                   <li>年</li>
               </ul>
               <div class="layui-tab-content">
                   <div class="layui-tab-item layui-show">
                       <form class="layui-form" lay-filter="sec-form">
                           <div class="layui-form-item">
                                <input type="radio" name="second" lay-filter="sec-radio-1"  value="" title="每秒 允许的通配符 [ , - * / ]" checked>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="second" lay-filter="sec-radio-2"  value="" title="周期从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" value="1" name="sec-start"  class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">-</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" value="10" name="sec-end"  class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">秒</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="second" lay-filter="sec-radio-3"  value="" title="从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" value="0" name="sec-th-start" placeholder="" autocomplete="off" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">秒开始，每</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" value="1" name="sec-gap" placeholder="" autocomplete="off" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">秒执行一次</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="second" lay-filter="sec-radio-4"  value="" title="指定"><br>
                               <div class="layui-inline" style="margin-left: 30px;" id="sec-point-wrap"></div>
                           </div>
                       </form>
                   </div>
                   <div class="layui-tab-item">
                       <form class="layui-form" lay-filter="min-form">
                           <div class="layui-form-item">
                               <input type="radio" name="minute" lay-filter="min-radio-1"  value="" title="每分钟 允许的通配符 [ , - * / ]" checked>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="minute" lay-filter="min-radio-2"  value="" title="周期从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="min-start" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">-</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="min-end" value="2" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">分钟</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="minute" lay-filter="min-radio-3"  value="" title="从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="min-th-start" value="0" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">分钟开始，每</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="min-gap" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">分钟执行一次</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="minute" lay-filter="min-radio-4"  value="" title="指定"><br>
                               <div class="layui-inline" style="margin-left: 30px;" id="min-point-wrap"></div>
                           </div>
                       </form>
                   </div>
                   <div class="layui-tab-item">
                       <form class="layui-form" lay-filter="hour-form">
                           <div class="layui-form-item">
                               <input type="radio" name="hour" lay-filter="hour-radio-1"  value="" title="每小时 允许的通配符 [ , - * / ]" checked>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="hour" lay-filter="hour-radio-2"  value="" title="周期从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="hour-start" value="0" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">-</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="hour-end" value="2" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">小时</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="hour" lay-filter="hour-radio-3"  value="" title="从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="hour-th-start" value="0" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">小时开始，每</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="hour-gap" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">小时执行一次</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="hour" lay-filter="hour-radio-4"  value="" title="指定"><br>
                               <div class="layui-inline" style="margin-left: 30px;" id="hour-point-wrap"></div>
                           </div>
                       </form>
                   </div>
                   <div class="layui-tab-item">
                       <form class="layui-form" lay-filter="day-form">
                           <div class="layui-form-item">
                               <input type="radio" name="day" lay-filter="day-radio-1"  value="" title="每日 允许的通配符 [ , - * / L W ] " checked>
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="day" lay-filter="day-radio-2"  value="" title="不指定">
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="day" lay-filter="day-radio-3"  value="" title="周期从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="day-start" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">-</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="day-end" value="2" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">日</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="day" lay-filter="day-radio-4"  value="" title="从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="day-th-start" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">日开始，每</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="day-gap" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">日执行一次</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="day" lay-filter="day-radio-5"  value="" title="每月">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="day-latest" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">号最近的那个工作日</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="day" lay-filter="day-radio-6"  value="" title="本月最后一天"><br>
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="day" lay-filter="day-radio-7"  value="" title="指定"><br>
                               <div class="layui-inline" style="margin-left: 30px;" id="day-point-wrap"></div>
                           </div>
                       </form>
                   </div>
                   <div class="layui-tab-item">
                       <form class="layui-form" lay-filter="month-form">
                           <div class="layui-form-item">
                               <input type="radio" name="month" lay-filter="month-radio-1"  value="" title="每月 允许的通配符 [ , - * / ] " checked>
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="month" lay-filter="month-radio-2"  value="" title="不指定">
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="month" lay-filter="month-radio-3"  value="" title="周期从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="month-start" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">-</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="month-end" value="2" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">月</div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="month" lay-filter="month-radio-4"  value="" title="从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="month-th-start" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">日开始，每</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="month-gap" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">月执行一次</div>
                               </div>
                           </div>

                           <div class="layui-form-item">
                               <input type="radio" name="month" lay-filter="month-radio-5"  value="" title="指定"><br>
                               <div class="layui-inline" style="margin-left: 30px;" id="month-point-wrap"></div>
                           </div>
                       </form>
                   </div>
                   <div class="layui-tab-item">
                       <form class="layui-form" lay-filter="week-form">
                           <div class="layui-form-item">
                               <input type="radio" name="week" lay-filter="week-radio-1"  value="" title="每周 允许的通配符 [ , - * / L # ] ">
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="week" lay-filter="week-radio-2"  value="" title="不指定" checked>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="week" lay-filter="week-radio-3"  value="" title="周期从星期">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="week-start" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">-</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="week-end" value="2" class="layui-input">
                                   </div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="week" lay-filter="week-radio-4"  value="" title="第">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="week-th-start" value="1" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">周的星期</div>
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="week-gap" value="1" class="layui-input">
                                   </div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="week" lay-filter="week-radio-5"  value="" title="本月最后一个星期">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 50px;">
                                       <input type="number" name="week-last" value="1" class="layui-input">
                                   </div>
                               </div>
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="week" lay-filter="week-radio-6"  value="" title="指定"><br>
                               <div class="layui-inline" style="margin-left: 30px;" id="week-point-wrap"></div>
                           </div>
                       </form>
                   </div>
                   <div class="layui-tab-item">
                       <form class="layui-form" lay-filter="year-form">
                           <div class="layui-form-item">
                               <input type="radio" name="year" checked lay-filter="year-radio-1"  value="" title="每年 允许的通配符 [ , - * / ]  非必填">
                           </div>
                           <div class="layui-form-item">
                               <input type="radio" name="year" lay-filter="year-radio-2"  value="" title="不指定">
                           </div>
                           <div class="layui-form-item">
                               <div class="layui-inline">
                                   <input type="radio" name="year" lay-filter="year-radio-3"  value="" title="周期从">
                               </div>
                               <div class="layui-inline">
                                   <div class="layui-input-inline" style="width: 100px;">
                                       <input type="number" name="year-start" value="2018" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">-</div>
                                   <div class="layui-input-inline" style="width: 100px;">
                                       <input type="number" name="year-end" value="2019" class="layui-input">
                                   </div>
                                   <div class="layui-form-mid">年</div>
                               </div>
                           </div>
                       </form>
                   </div>
               </div>
           </div>
       </div>
        <div class="layui-btn-container" style="margin-top: 10px;">
            <button class="layui-btn layui-btn-normal" data-clipboard-target="#cronExpress" id="copy">复制表达式到剪切板</button>
            <button class="layui-btn layui-btn-disabled">功能2</button>
            <button class="layui-btn layui-btn-disabled">功能3</button>
            <button class="layui-btn layui-btn-disabled">功能4</button>
        </div>
        <form class="layui-form" lay-filter="express">

            <div class="layui-inline">
                   <label class="layui-form-label"></label>
                   <div class="layui-input-inline" style="width: 100px;text-align: center">秒</div>
                   <div class="layui-input-inline" style="width: 100px;text-align: center">分</div>
                   <div class="layui-input-inline" style="width: 100px;text-align: center">时</div>
                   <div class="layui-input-inline" style="width: 100px;text-align: center">日</div>
                   <div class="layui-input-inline" style="width: 100px;text-align: center">月</div>
                   <div class="layui-input-inline" style="width: 100px;text-align: center">周</div>
                   <div class="layui-input-inline" style="width: 100px;text-align: center">年</div>
               </div>
            <div class="layui-inline">
                   <label class="layui-form-label" style="font-weight: bold;">表达式字段</label>
                   <div class="layui-input-inline" style="width: 100px;">
                       <input type="text" disabled name="sec-field" value="*" class="layui-input">
                   </div>
                   <div class="layui-input-inline" style="width: 100px;">
                       <input type="text" disabled name="min-field" value="*"  class="layui-input">
                   </div>
                   <div class="layui-input-inline" style="width: 100px;">
                       <input type="text" disabled name="hour-field" value="*"  class="layui-input">
                   </div>
                   <div class="layui-input-inline" style="width: 100px;">
                       <input type="text" disabled name="day-field" value="*"  class="layui-input">
                   </div>
                   <div class="layui-input-inline" style="width: 100px;">
                       <input type="text" disabled name="month-field" value="*"  class="layui-input">
                   </div>
                   <div class="layui-input-inline" style="width: 100px;">
                       <input type="text" disabled name="week-field" value="?"  class="layui-input">
                   </div>
                   <div class="layui-input-inline" style="width: 100px;">
                       <input type="text" disabled name="year-field" value="*"  class="layui-input">
                   </div>
               </div>
            <div class="layui-form-item" style="margin-top: 10px;">
                <label class="layui-form-label" style="font-weight: bold;">cron表达式</label>
                <div class="layui-input-inline">
                    <input type="text" id="cronExpress" value="* * * * * ? *" readonly="readonly"  class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">注意SpringTask不支持7位数的表达式，使用SpringTask的朋友去掉年份</div>
            </div>
        </form>

        <div class="tab-wrap" style="padding: 10px 20px">
            <h3 class="tab-wrap-square">留言评论</h3>

            <div th:replace="onlineutils/linux :: messageBox"></div>
            <h2 class="reply-all-head">所有回复</h2>
            <div th:replace="onlineutils/linux :: comment"></div>
            <div th:if="${pageTotal != 0}" class="layui-btn-container" style="margin-top: 20px;">
                <a th:href="@{/util/quartz(page=${page-1},bindId=${bindId})}" th:class="${page == 1 ? 'layui-btn layui-btn-disabled':'layui-btn'}"> <i class="layui-icon layui-icon-left"></i></a>
                <a th:href="@{/util/quartz(page=${num},bindId=${bindId})}" th:class="${num == page ? 'layui-btn layui-btn-normal':'layui-btn'}" th:each="num : ${pageNumList}" th:text="${num}"></a>
                <a th:href="@{/util/quartz(page=${page+1},bindId=${bindId})}" th:class="${page == pageTotal ? 'layui-btn layui-btn-disabled':'layui-btn'}"> <i class="layui-icon layui-icon-right"></i></a>
            </div>
        </div>
    </div>
    <div class="right">
        <div style="width: 100%;height: 200px;background-color: #cdd;margin-top: 20px;">

        </div>
        <div style="width: 100%;height: 200px;background-color: #cdf;margin-top: 20px;">

        </div>
        <div style="width: 100%;height: 200px;background-color: #dfc;margin-top: 20px;">

        </div>
    </div>
</div>


<script src="https://www.sunyuchao.com/static/js/heart.js"></script>
<script src="https://www.sunyuchao.com/static/layui/layui.js"></script>
<script src="https://www.sunyuchao.com/static/js/clipboard.min.js"></script>
    <script src="https://www.sunyuchao.com/static/js/jquery3.3.1.min.js"></script>
<script src="https://www.sunyuchao.com/static/js/reply.js"></script>

    <script src="https://www.sunyuchao.com/static/js/common.js"></script>

<!--子回复模板-->
<script type="text/template" id="childMsg">
    <div class="msg-history">
        <div class="mh-left">
            <img class="radius" src="{avatar}" width="40" height="40">
        </div>
        <div class="mh-right">
            <input type="hidden" class="userId" value="{userId}">
            <p>
                        <span style="float: left;"><span><a class="comment" href="javascript:;">{commentUsername}</a></span> 回复  <span>
                            <a href="javascript:;" class="commented">{commentedUsername}</a></span></span>
                <span style="float: right;" class="timeago" datetime="{time}"></span>
            </p>
            <p class="reply-content">
                {content}
            </p>
            <p class="operate">
                <span class="muted"> <a onclick="openChildReply(this)" href="javascript:;">回复</a></span>
            </p>
        </div>
        <hr>
    </div>
    <div class="layui-clear"></div>
</script>
<!--1级回复模板-->
<script type="text/template" id="FirstMsg">
    <li class="item">
        <div class="item-left">
            <img class="radius" src="{avatar}" width="50" height="50">
        </div>
        <div class="item-right">
            <p>
                <span style="float: left;"><a href="javascript:;" class="floor">{commentUsername}</a></span>
                <span style="float: right;" class="timeago" datetime="{time}"></span>
            </p>
            <p class="reply-content">
                {content}
            </p>
            <p class="operate">
                <span class="muted"> <a class="show" onclick="show(this)" href="javascript:;">展开</a>(<span>0</span>)</span>
                <span class="muted"> <a onclick="openReply(this)" href="javascript:;">回复</a></span>
                <span class="muted"> <a href="#"><i class="layui-icon layui-icon-praise"></i>17</a></span>
                <span class="muted"> <a href="#"><i class="layui-icon layui-icon-tread"></i>17</a></span>
            </p>
            <div class="msg-content">

            </div>
            <div class="item-child-smbx">
                <input type="hidden" class="receiverUserId" value="{commentId}">
                回复 <span class="receiver">{commentUsernameCopy}</span>
                <div contenteditable="true" class="layui-textarea" placeholder=""></div>
                <div class="smb-r-bottom">
                    <a onclick="loadFace(this)" href="javascript:;"><img src="/layui/images/face/1.gif"></a>
                    <div class="face-frame"></div>
                    <button onclick="saveMsg(this)" class="layui-btn layui-btn-normal" style="float: right;margin-right: 8px;">留言</button>
                </div>
            </div>

        </div>
        <div class="layui-clear"></div>
    </li>
</script>

<script th:inline="javascript">
    var currentUser=[[${session.loginUser}]];
    var currentUserId;
    if(currentUser != null){
        currentUserId=currentUser.id;
    }
</script>
<script>
    /**
     * 留言给我
     * */
    function msgToMe(obj) {
        var frameObj = $(obj).parent().prev();
        var replyEntity={};
        replyEntity.content = $(frameObj).html().replace(/&nbsp;/ig,'');;//回复内容
        replyEntity.commentedUserId=1;//被回复者默认是我（生产中放到后台）
        replyEntity.level = 1;
        replyEntity.type = 9;
        replyEntity.userId=currentUserId;
        replyEntity.bindId=$("input[name=id]").val();
        if($.trim(replyEntity.content).length == 0){
            alert("请输入内容")
            return false;
        }
        var retInfo={};
        var flag=false;
        $.ajax({
            url:"/userComment/saveFirstMessage",
            type:"POST",
            data:replyEntity,
            async:false,
            success:function (e) {
                if(e.success){
                    retInfo=e.data;
                    flag=true;
                }else{
                    layui.layer.alert(e.message);
                }
            },dataType: "json"
        });
        //校验
        if(!flag){
            return;
        }
        var html=$("#FirstMsg").html();
        var arr = [];
        arr.push(formatTemplate(retInfo, html));
        $("#message-comment-body").prepend(arr.join(''));
        $(frameObj).html("");//清空文本域
        layui.timeago.render($('.timeago'));
    }




    /**
     * 保存评论
     * */
    function saveMsg(obj,parentId){

        //获取回复信息
        var frameObj = $(obj).parent().prev();
        var msg = $(frameObj).html().replace(/&nbsp;/ig,'');;//回复信息
        var receiver = $(obj).parent().parent().children(".receiver");
        var receiverUserId = $(obj).parent().parent().children(".receiverUserId");
        var commented = $(receiver).html();
        var commentedId = $(receiverUserId).val();
        var replyEntity={};
        replyEntity.userId=currentUserId;
        replyEntity.commentedUserId=commentedId;
        replyEntity.content=msg;
        replyEntity.level=2;
        replyEntity.type=9;
        replyEntity.bindId=$("input[name=id]").val();
        replyEntity.parentId=parentId;
        var flag=false;
        var retInfo={};
        $.ajax({
            url:"/userComment/saveChildrenMessage",
            type:"POST",
            data:replyEntity,
            async:false,
            success:function (e) {
                if(e.success){
                    retInfo=e.data;
                    flag=true;
                }else{
                    layui.layer.alert(e.message);
                }
            },dataType:"json"
        });
        //校验
        if(!flag){
            return;
        }
        var prev = $(obj).parent().parent().prev();
        if($(prev).is(":hidden")){
            $(prev).show();
        }

        var html = $("#childMsg").html();
        var arr = [];
        arr.push(formatTemplate(retInfo, html));
        $(prev).append(arr.join(''));//追加回复信息
        var show = $(obj).parent().parent().prev().prev().find(".show");//展开按钮
        $(show).html("关闭");

        $(frameObj).html("");//清空回复框
        layui.timeago.render($('.timeago'));
    }
</script>
<script>
    layui.config({base:'https://www.sunyuchao.com/static/layui/extends/'});
    layui.use(['element','form','layer','timeago'], function(){
        var form=layui.form,
            $=layui.jquery,
            timeago=layui.timeago,
            element=layui.element,
            layer=layui.layer;
        timeago.render($('.timeago'));
        //必须要初始化 第一种初始化
        var clipboard = new ClipboardJS('#copy');
        clipboard.on('success', function(e) {
            layer.msg("成功复制到剪切板")
        });
        clipboard.on('error', function(e) {
            layer.msg("复制失败")
        });

        var secExp  =$("input[name=sec-field]");
        var minExp  =$("input[name=min-field]");
        var hourExp =$("input[name=hour-field]");
        var dayExp  =$("input[name=day-field]");
        var monthExp=$("input[name=month-field]");
        var weekExp =$("input[name=week-field]");
        var yearExp =$("input[name=year-field]");

        initPointWrap();//初始化指定复选框
        form.render();//重新渲染form

        //------------------------------------------------------------秒
        //点  秒 第一个单选
        form.on('radio(sec-radio-1)',function () {
            $("input[name=sec-field]").val("*");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第二个单选
        form.on('radio(sec-radio-2)',function () {
            var start = $("input[name=sec-start]").val();
            var end = $("input[name=sec-end]").val();
            $("input[name=sec-field]").val(start+"-"+end);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第三个单选
        form.on('radio(sec-radio-3)',function () {
            var th_start = $("input[name=sec-th-start]").val();
            var gap = $("input[name=sec-gap]").val();
            $("input[name=sec-field]").val(th_start+"/"+gap);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第四个单选
        form.on('radio(sec-radio-4)',function () {
            var res="";
            $("input:checkbox[name=second-point]:checked").each(function(i){
                var attr = $(this).val();
                res+=attr+",";
            });
            res=res.substring(0,res.length - 1);
            $("input[name=sec-field]").val(res);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });

        //周期选则
        $("input[name=sec-start],input[name=sec-end]").on("change",function(){
            if($(this).val() < 0){
                $(this).val("0");
            }
            if($(this).val() > 59){
                $(this).val("59");
            }
            if($("input[name=second]").eq(1).is(":checked") /**如果当前 sec-radio-2 是选中状态*/){
                var start = $("input[name=sec-start]").val();
                var end = $("input[name=sec-end]").val();
                $("input[name=sec-field]").val(start+"-"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //从第几秒开始选择
        $("input[name=sec-th-start],input[name=sec-gap]").on("change",function(){
            if($(this).val() < 0){
                $(this).val("0");
            }
            if($(this).val() > 59){
                $(this).val("59");
            }
            if($("input[name=second]").eq(2).is(":checked") /**如果当前 sec-radio-3 是选中状态*/){
                var start = $("input[name=sec-th-start]").val();
                var end = $("input[name=sec-gap]").val();
                $("input[name=sec-field]").val(start+"/"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //复选框选择
        form.on('checkbox(second-point)',function (data) {
            if($("input[name=second]").eq(3).is(":checked") /**如果当前 sec-radio-4 是选中状态*/) {
                var res = "";
                $("input:checkbox[name=second-point]:checked").each(function (i) {
                    var attr = $(this).val();
                    res += attr + ",";
                });
                res = res.substring(0, res.length - 1);
                $("input[name=sec-field]").val(res);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });

        //------------------------------------------------------------分

        //点  秒 第一个单选
        form.on('radio(min-radio-1)',function () {
            $("input[name=min-field]").val("*");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第二个单选
        form.on('radio(min-radio-2)',function () {
            var start = $("input[name=min-start]").val();
            var end = $("input[name=min-end]").val();
            $("input[name=min-field]").val(start+"-"+end);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第三个单选
        form.on('radio(min-radio-3)',function () {
            var th_start = $("input[name=min-th-start]").val();
            var gap = $("input[name=min-gap]").val();
            $("input[name=min-field]").val(th_start+"/"+gap);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第四个单选
        form.on('radio(min-radio-4)',function () {
            var res="";
            $("input:checkbox[name=minute-point]:checked").each(function(i){
                var attr = $(this).val();
                res+=attr+",";
            });
            res=res.substring(0,res.length - 1);
            $("input[name=min-field]").val(res);
            $("input[name=sec-field]").val(0);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });

        //周期选则
        $("input[name=min-start],input[name=min-end]").on("change",function(){
            if($(this).val() < 0){
                $(this).val("0");
            }
            if($(this).val() > 59){
                $(this).val("59");
            }
            if($("input[name=minute]").eq(1).is(":checked") /**如果当前 min-radio-2 是选中状态*/){
                var start = $("input[name=min-start]").val();
                var end = $("input[name=min-end]").val();
                $("input[name=min-field]").val(start+"-"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //从第几秒开始选择
        $("input[name=min-th-start],input[name=min-gap]").on("change",function(){
            if($(this).val() < 0){
                $(this).val("0");
            }
            if($(this).val() > 59){
                $(this).val("59");
            }
            if($("input[name=minute]").eq(2).is(":checked") /**如果当前 sec-radio-3 是选中状态*/){
                var start = $("input[name=min-th-start]").val();
                var end = $("input[name=min-gap]").val();
                $("input[name=min-field]").val(start+"/"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //复选框选择
        form.on('checkbox(minute-point)',function (data) {
            if($("input[name=minute]").eq(3).is(":checked") /**如果当前 sec-radio-4 是选中状态*/) {
                var res = "";
                $("input:checkbox[name=minute-point]:checked").each(function (i) {
                    var attr = $(this).val();
                    res += attr + ",";
                });
                res = res.substring(0, res.length - 1);
                $("input[name=min-field]").val(res);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });



        //------------------------------------------------------------时


        //点  秒 第一个单选
        form.on('radio(hour-radio-1)',function () {
            $("input[name=hour-field]").val("*");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第二个单选
        form.on('radio(hour-radio-2)',function () {
            var start = $("input[name=hour-start]").val();
            var end = $("input[name=hour-end]").val();
            $("input[name=hour-field]").val(start+"-"+end);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第三个单选
        form.on('radio(hour-radio-3)',function () {
            var th_start = $("input[name=hour-th-start]").val();
            var gap = $("input[name=hour-gap]").val();
            $("input[name=hour-field]").val(th_start+"/"+gap);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第四个单选
        form.on('radio(hour-radio-4)',function () {
            var res="";
            $("input:checkbox[name=hour-point]:checked").each(function(i){
                var attr = $(this).val();
                res+=attr+",";
            });
            res=res.substring(0,res.length - 1);
            $("input[name=hour-field]").val(res);
            $("input[name=sec-field]").val(0);
            $("input[name=min-field]").val(0);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });

        //周期选则
        $("input[name=hour-start],input[name=hour-end]").on("change",function(){
            if($(this).val() < 0){
                $(this).val("0");
            }
            if($(this).val() > 23){
                $(this).val("23");
            }
            if($("input[name=hour]").eq(1).is(":checked") /**如果当前 min-radio-2 是选中状态*/){
                var start = $("input[name=hour-start]").val();
                var end = $("input[name=hour-end]").val();
                $("input[name=hour-field]").val(start+"-"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //从第几秒开始选择
        $("input[name=hour-th-start],input[name=hour-gap]").on("change",function(){
            if($(this).val() < 0){
                $(this).val("0");
            }
            if($(this).val() > 23){
                $(this).val("23");
            }
            if($("input[name=hour]").eq(2).is(":checked") /**如果当前 sec-radio-3 是选中状态*/){
                var start = $("input[name=hour-th-start]").val();
                var end = $("input[name=hour-gap]").val();
                $("input[name=hour-field]").val(start+"/"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //复选框选择
        form.on('checkbox(hour-point)',function (data) {
            if($("input[name=hour]").eq(3).is(":checked") /**如果当前 sec-radio-4 是选中状态*/) {
                var res = "";
                $("input:checkbox[name=hour-point]:checked").each(function (i) {
                    var attr = $(this).val();
                    res += attr + ",";
                });
                res = res.substring(0, res.length - 1);
                $("input[name=hour-field]").val(res);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });

        //----------------------------------------------------------------------日
        //点  秒 第一个单选
        form.on('radio(day-radio-1)',function () {
            $("input[name=day-field]").val("*");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第二个单选
        form.on('radio(day-radio-2)',function () {
            $("input[name=day-field]").val("?");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第三个单选
        form.on('radio(day-radio-3)',function () {
            var start = $("input[name=day-start]").val();
            var end = $("input[name=day-end]").val();
            $("input[name=day-field]").val(start+"-"+end);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第四个单选
        form.on('radio(day-radio-4)',function () {
            var th_start = $("input[name=day-th-start]").val();
            var gap = $("input[name=day-gap]").val();
            $("input[name=day-field]").val(th_start+"/"+gap);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第五个单选
        form.on('radio(day-radio-5)',function () {
            $("input[name=day-field]").val($("input[name=day-latest]").val()+"W");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第六个单选
        form.on('radio(day-radio-6)',function () {
            $("input[name=day-field]").val("L");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        form.on('radio(day-radio-7)',function () {
            var res="";
            $("input:checkbox[name=day-point]:checked").each(function(i){
                var attr = $(this).val();
                res+=attr+",";
            });
            res=res.substring(0,res.length - 1);
            $("input[name=day-field]").val(res);
            $("input[name=sec-field]").val(0);
            $("input[name=min-field]").val(0);
            $("input[name=hour-field]").val(0);
            $("input[name=week-field]").val("?");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });

        //周期选则
        $("input[name=day-start],input[name=day-end]").on("change",function(){
            if($(this).val() < 1){
                $(this).val("1");
            }
            if($(this).val() > 31){
                $(this).val("31");
            }
            if($("input[name=day]").eq(2).is(":checked") /**如果当前 sec-radio-2 是选中状态*/){
                var start = $("input[name=day-start]").val();
                var end = $("input[name=day-end]").val();
                $("input[name=day-field]").val(start+"-"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //从第几秒开始选择
        $("input[name=day-th-start],input[name=day-gap]").on("change",function(){
            if($(this).val() < 1){
                $(this).val("1");
            }
            if($(this).val() > 31){
                $(this).val("31");
            }
            if($("input[name=day]").eq(3).is(":checked") /**如果当前 sec-radio-3 是选中状态*/){
                var start = $("input[name=day-th-start]").val();
                var end = $("input[name=day-gap]").val();
                $("input[name=day-field]").val(start+"/"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });

        //从第几秒开始选择
        $("input[name=day-latest]").on("change",function(){
            if($(this).val() < 1){
                $(this).val("1");
            }
            if($(this).val() > 31){
                $(this).val("31");
            }
            if($("input[name=day]").eq(4).is(":checked") /**如果当前 sec-radio-3 是选中状态*/){
                $("input[name=day-field]").val($(this).val()+"W");
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //复选框选择
        form.on('checkbox(day-point)',function (data) {
            if($("input[name=day]").eq(6).is(":checked") /**如果当前 sec-radio-4 是选中状态*/) {
                var res = "";
                $("input:checkbox[name=day-point]:checked").each(function (i) {
                    var attr = $(this).val();
                    res += attr + ",";
                });
                res = res.substring(0, res.length - 1);
                $("input[name=day-field]").val(res);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });

        //-----------------------------------------------------------------月
        //点  秒 第一个单选
        form.on('radio(month-radio-1)',function () {
            $("input[name=month-field]").val("*");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第二个单选
        form.on('radio(month-radio-2)',function () {
            $("input[name=month-field]").val("?");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第三个单选
        form.on('radio(month-radio-3)',function () {
            var start = $("input[name=month-start]").val();
            var end = $("input[name=month-end]").val();
            $("input[name=month-field]").val(start+"-"+end);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第四个单选
        form.on('radio(month-radio-4)',function () {
            var th_start = $("input[name=month-th-start]").val();
            var gap = $("input[name=month-gap]").val();
            $("input[name=month-field]").val(th_start+"/"+gap);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        form.on('radio(month-radio-5)',function () {
            var res="";
            $("input:checkbox[name=month-point]:checked").each(function(i){
                var attr = $(this).val();
                res+=attr+",";
            });
            res=res.substring(0,res.length - 1);
            $("input[name=month-field]").val(res);
            $("input[name=sec-field]").val(0);
            $("input[name=min-field]").val(0);
            $("input[name=hour-field]").val(0);
            $("input[name=day-field]").val(1);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });

        //周期选则
        $("input[name=month-start],input[name=month-end]").on("change",function(){
            if($(this).val() < 1){
                $(this).val("1");
            }
            if($(this).val() > 12){
                $(this).val("12");
            }
            if($("input[name=month]").eq(2).is(":checked") /**如果当前 min-radio-2 是选中状态*/){
                var start = $("input[name=month-start]").val();
                var end = $("input[name=month-end]").val();
                $("input[name=month-field]").val(start+"-"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //从第几秒开始选择
        $("input[name=month-th-start],input[name=month-gap]").on("change",function(){
            if($(this).val() < 1){
                $(this).val("1");
            }
            if($(this).val() > 12){
                $(this).val("12");
            }
            if($("input[name=month]").eq(3).is(":checked") /**如果当前 sec-radio-3 是选中状态*/){
                var start = $("input[name=month-th-start]").val();
                var end = $("input[name=month-gap]").val();
                $("input[name=month-field]").val(start+"/"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //复选框选择
        form.on('checkbox(month-point)',function (data) {
            if($("input[name=month]").eq(4).is(":checked") /**如果当前 sec-radio-4 是选中状态*/) {
                var res = "";
                $("input:checkbox[name=month-point]:checked").each(function (i) {
                    var attr = $(this).val();
                    res += attr + ",";
                });
                res = res.substring(0, res.length - 1);
                $("input[name=month-field]").val(res);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });

        //-----------------------------------------------------------------周
        //点  秒 第一个单选
        form.on('radio(week-radio-1)',function () {
            $("input[name=week-field]").val("*");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第二个单选
        form.on('radio(week-radio-2)',function () {
            $("input[name=week-field]").val("?");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第三个单选
        form.on('radio(week-radio-3)',function () {
            var start = $("input[name=week-start]").val();
            var end = $("input[name=week-end]").val();
            $("input[name=week-field]").val(start+"-"+end);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第四个单选
        form.on('radio(week-radio-4)',function () {
            var th_start = $("input[name=week-th-start]").val();
            var gap = $("input[name=week-gap]").val();
            $("input[name=week-field]").val(th_start+"/"+gap);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });

        form.on('radio(week-radio-5)',function () {
            $("input[name=week-field]").val($("input[name=week-last]").val()+"L");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });

        form.on('radio(week-radio-6)',function () {
            var res="";
            $("input:checkbox[name=week-point]:checked").each(function(i){
                var attr = $(this).val();
                res+=attr+",";
            });
            res=res.substring(0,res.length - 1);
            $("input[name=week-field]").val(res);

            $("input[name=sec-field]").val(0);
            $("input[name=min-field]").val(0);
            $("input[name=hour-field]").val(0);
            $("input[name=day-field]").val("?");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });

        //周期选则
        $("input[name=week-start],input[name=week-end]").on("change",function(){
            if($(this).val() < 1){
                $(this).val("1");
            }
            if($(this).val() > 12){
                $(this).val("12");
            }
            if($("input[name=week]").eq(2).is(":checked") /**如果当前 min-radio-2 是选中状态*/){
                var start = $("input[name=week-start]").val();
                var end = $("input[name=week-end]").val();
                $("input[name=week-field]").val(start+"-"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //从第几秒开始选择
        $("input[name=week-th-start],input[name=week-gap]").on("change",function(){
            if($("input[name=week]").eq(3).is(":checked") /**如果当前 sec-radio-3 是选中状态*/){
                var start = $("input[name=week-th-start]").val();
                var end = $("input[name=week-gap]").val();
                $("input[name=week-field]").val(start+"/"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //从第几秒开始选择
        $("input[name=week-last]").on("change",function(){
            if($("input[name=week]").eq(4).is(":checked") /**如果当前 sec-radio-3 是选中状态*/){
                $("input[name=week-field]").val($("input[name=week-last]").val()+"L");
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        //复选框选择
        form.on('checkbox(week-point)',function (data) {
            if($("input[name=week]").eq(5).is(":checked") /**如果当前 sec-radio-4 是选中状态*/) {
                var res = "";
                $("input:checkbox[name=week-point]:checked").each(function (i) {
                    var attr = $(this).val();
                    res += attr + ",";
                });
                res = res.substring(0, res.length - 1);
                $("input[name=week-field]").val(res);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });

        //-----------------------------------------------------------------年
        form.on('radio(year-radio-1)',function () {
            $("input[name=year-field]").val("*");
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第二个单选
        form.on('radio(year-radio-2)',function () {
            $("input[name=year-field]").val("")
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });
        //点  秒 第三个单选
        form.on('radio(year-radio-3)',function () {
            var start = $("input[name=year-start]").val();
            var end = $("input[name=year-end]").val();
            $("input[name=year-field]").val(start+"-"+end);
            $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
        });

        //周期选则
        $("input[name=year-start],input[name=year-end]").on("change",function(){
            if($("input[name=year]").eq(2).is(":checked") /**如果当前 min-radio-2 是选中状态*/){
                var start = $("input[name=year-start]").val();
                var end = $("input[name=year-end]").val();
                $("input[name=year-field]").val(start+"-"+end);
                $("#cronExpress").val(secExp.val()+" "+minExp.val()+" "+hourExp.val()+" "+dayExp.val()
                    +" "+monthExp.val()+" "+weekExp.val()+" "+yearExp.val());
            }
        });
        /**
         * 初始化复选框
         * */
        function initPointWrap() {
            for(var i = 0;i < 60;i++){
                var tag = i < 10 ? "0"+i : i;
                if(i == 0){
                    $("#sec-point-wrap").append('<input lay-filter="second-point" type="checkbox" value="'+i+'" name="second-point" lay-skin="primary" checked title="'+tag+'">');
                    $("#min-point-wrap").append('<input lay-filter="minute-point" type="checkbox" value="'+i+'" name="minute-point" lay-skin="primary" checked title="'+tag+'">');
                    $("#hour-point-wrap").append('<input lay-filter="hour-point" type="checkbox" value="'+i+'" name="hour-point" lay-skin="primary" checked title="'+tag+'">');
                }
                else if(i == 1){
                    $("#day-point-wrap").append('<input lay-filter="day-point" type="checkbox" value="'+i+'" name="day-point" lay-skin="primary" checked title="'+tag+'">');
                    $("#month-point-wrap").append('<input lay-filter="month-point" type="checkbox" value="'+i+'" name="month-point" lay-skin="primary" checked title="'+tag+'">');
                    $("#week-point-wrap").append('<input lay-filter="week-point" type="checkbox" value="'+i+'" name="week-point" lay-skin="primary" checked title="'+tag+'">');
                } else{
                    $("#sec-point-wrap").append('<input lay-filter="second-point" type="checkbox" value="'+i+'" name="second-point" lay-skin="primary" title="'+tag+'">');
                    $("#min-point-wrap").append('<input lay-filter="minute-point" type="checkbox" value="'+i+'" name="minute-point" lay-skin="primary" title="'+tag+'">');
                    if(i < 24){
                        $("#hour-point-wrap").append('<input lay-filter="hour-point" type="checkbox" value="'+i+'" name="hour-point" lay-skin="primary" title="'+tag+'">');
                    }
                    if( i > 1 && i < 32){
                        $("#day-point-wrap").append('<input lay-filter="day-point" type="checkbox" value="'+i+'" name="day-point" lay-skin="primary" title="'+tag+'">');
                    }
                    if(i > 1 && i < 13){
                        $("#month-point-wrap").append('<input lay-filter="month-point" type="checkbox" value="'+i+'" name="month-point" lay-skin="primary" title="'+tag+'">');
                    }
                    if(i > 1 && i < 8){
                        $("#week-point-wrap").append('<input lay-filter="week-point" type="checkbox" value="'+i+'" name="week-point" lay-skin="primary" title="'+tag+'">');
                    }
                }
            }
        }
    });
</script>
<script src="/login.js"></script>
</body>
</html>